package com.example.zsf.network;

import com.example.zsf.base.Result;
import com.example.zsf.model.CollectRecordModel;
import com.example.zsf.model.FavoriteModel;
import com.example.zsf.model.MessageModel;
import com.example.zsf.model.MobileDetailModel;
import com.example.zsf.model.MobileModel;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface Api {
    @POST("api/App.php?act=getList")
    @Headers({"Content-Type:application/json"})
    Call<Result<MobileModel>> getList(@Body HashMap hashMap);


    @POST("api/App.php?act=sendCode")
    @FormUrlEncoded
    Call<Result<HashMap>> sendMessage(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=login")
    @FormUrlEncoded
    Call<Result<HashMap>> login(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=myMsg")
    @Headers({"Content-Type:application/json"})
    Call<Result<ArrayList<MessageModel>>> getMessage();

    @POST("api/App.php?act=lookAds")
    @FormUrlEncoded
    Call<Result<MobileDetailModel>> getAdInfo(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=follow")
    @FormUrlEncoded
    Call<Result<HashMap>> favorite(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=myFollow")
    @FormUrlEncoded
    Call<Result<FavoriteModel>> getMyFavorite(@FieldMap HashMap<String, String> hashMap);

    @POST("api/App.php?act=myRcv")
    @FormUrlEncoded
    Call<Result<CollectRecordModel>> getCollectRecord(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=getPayList")
    @FormUrlEncoded
    Call<Result<List<String>>> getPayList(@FieldMap HashMap<String, String> hashMap);

    @POST("api/App.php?act=perfect")
    @FormUrlEncoded
    Call<Result<HashMap>> enterInfo(@FieldMap HashMap<String, String> hashMap);


    @POST("api/App.php?act=grab")
    @FormUrlEncoded
    Call<Result<HashMap>> grab(@FieldMap HashMap<String, String> hashMap);


}
